#{extends 'main.html' /}
#{set title:'Assignment Submissions' /}
<h2>${ass.toString()}</h2>
<h4>Deadline: <span class="formatTime">${ass.deadline}</span></h4>
<ul>
#{list items:ass.submissions, as:'sub'}
	<li class="${sub.toGrade ? 'chosen' : ''}" style="padding:5px;border-radius:15px;">
		<div>Submitted by ${sub.student.username} at <span class="formatTime">${sub.time}</span></div>
		<div>Uploaded: ${sub.getFile().getName()} <a href="/download/submission?id=${sub.id}">download</a> &bull; <a href="/show/submission?id=${sub.id}">view file</a>#{if ! sub.toGrade} &bull; <a href="/submissions/pick?subId=${sub.id}">Pick assignment for grading</a>#{/if}</div>
	</li>
#{/list}
</ul>

<a href="/download/csvreport?id=${ass.id}">Download CSV report for this assignment</a>